package com.prs.crm.dao.oa.impl;

import java.util.Collection;

import org.hibernate.Criteria;
import org.hibernate.criterion.Restrictions;
import org.springframework.orm.hibernate3.HibernateCallback;

import com.prs.crm.dao.impl.BaseDaoImpl;
import com.prs.crm.dao.oa.MyFileDao;
import com.prs.crm.domain.oa.MyFile;
import com.prs.crm.domain.oa.MyFileFolder;

public class MyFileDaoImpl extends BaseDaoImpl<MyFile> implements MyFileDao{

	@Override
	public Collection<MyFile> getMyFileByFolder(MyFileFolder folder) {
		// TODO Auto-generated method stub
		Criteria criteria = this.getSession().createCriteria(MyFile.class);
		criteria.add(Restrictions.eq("folder", folder));
		return criteria.list();
	}

}
